#ifndef _STRING_H_
#define _STRING_H_

#ifndef NULL
#define NULL ((void *) 0)
#endif

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned int size_t;
#endif

static inline int strlen(const char *s)
{
    char *p = (char *) s;
    while (*s++);
    return s - p;
}

static inline void *memset(void *s, int c, unsigned int count)
{
    __asm__("cld\n\t"
            "rep\n\t"
            "stosb"
            :: "a"(c), "D"(s), "c"(count));
    return s;
}

#endif
